package com.djf.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

/**
 * 流程实例实体类
 * 用于存储业务流程的基本信息
 * 
 * @author djf
 * @date 2025/01/20
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("process_instance")
public class ProcessInstance {

    @TableId(type = IdType.AUTO)
    private Long id;

    @TableField("process_instance_id")
    private String processInstanceId;
    
    @TableField("process_definition_key")
    private String processDefinitionKey;
    
    @TableField("process_definition_name")
    private String processDefinitionName;
    
    @TableField("business_key")
    private String businessKey;
    
    @TableField("title")
    private String title;
    
    @TableField("starter_user_id")
    private String starterUserId;
    
    @TableField("starter_user_name")
    private String starterUserName;
    
    @TableField("status")
    private String status;
    
    @TableField("current_activity")
    private String currentActivity;
    
    @TableField("start_time")
    private LocalDateTime startTime;
    
    @TableField("end_time")
    private LocalDateTime endTime;
    
    @TableField("duration")
    private Long duration;
    
    @TableField("remark")
    private String remark;
    
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;
    
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;
    
    @TableLogic
    @TableField("deleted")
    private Integer deleted;


}